<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"> 

<h:head></h:head> 
<body>

	<h:form id="formAddContato">
			
		<br/>
		<h:messages />
		<br/>
		
		<h2 align="center"> Cadastro de Contatos </h2>
		
		<h:panelGrid columns="3">
		
			<h:outputText value="Nome: " />
			<h:inputText id="nome" value="#{contatoManager.contato.nome}" required="true" requiredMessage="Campo Obrigatório!"/>
			<h:message for="nome"/>
			
			<h:outputText value="Telefone: " />
			<h:inputText id="telefone" value="#{contatoManager.contato.telefone}" required="true" requiredMessage="Campo Obrigatório!"/>
			<h:message for="telefone"/>
		
		</h:panelGrid>
		
		<h:commandButton value="Salvar" action="#{contatoManager.salvar}" />
		
	</h:form> 

</body> 
</html>
